/*
 * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.inspur.edp.cef.generator.coreGenerator.base.entitygen;


import com.inspur.edp.caf.generator.baseInfo.TypeInfo;
import com.inspur.edp.caf.generator.item.ClassGeneratorContext;
import com.inspur.edp.cef.designtime.api.IGspCommonDataType;
import com.inspur.edp.cef.designtime.api.IGspCommonField;
import com.inspur.edp.cef.generator.coreGenerator.base.entitygen.determination.DataTypeDtmsGenCtx;
import com.inspur.edp.cef.generator.coreGenerator.base.entitygen.validation.DataTypeValidationsGenCtx;
import com.inspur.edp.cef.generator.entityGenerator.BaseEntityGeneratorContext;

public class DataTypeImpContext extends ClassGeneratorContext {

  private EntityGeneratorContext privateParentContext;
  private String privateNodeCode;
  private String privateClassName;
  private String privateCefDataTypeName;
  private IGspCommonDataType dataType;

  public final EntityGeneratorContext getParentContext() {
    return privateParentContext;
  }

  public final void setParentContext(EntityGeneratorContext value) {
    privateParentContext = value;
  }

  public final String getNodeCode() {
    return privateNodeCode;
  }

  public final void setNodeCode(String value) {
    privateNodeCode = value;
  }

  public final String getClassName() {
    return privateClassName;
  }

  public final void setClassName(String value) {
    privateClassName = value;
  }

  public final String getCefDataTypeName() {
    return privateCefDataTypeName;
  }

  public final void setCefDataTypeName(String value) {
    privateCefDataTypeName = value;
  }

  public IGspCommonDataType getDataType() {
    return dataType;
  }

  public void setDataType(IGspCommonDataType dataType) {
    this.dataType = dataType;
  }

  private DataTypeDtmsGenCtx privateDtmsGenCtx;

  public final DataTypeDtmsGenCtx getDtmsGenCtx() {
    return privateDtmsGenCtx;
  }

  public final void setDtmsGenCtx(DataTypeDtmsGenCtx value) {
    privateDtmsGenCtx = value;
  }

  private DataTypeValidationsGenCtx privateValsGenCtx;

  public final DataTypeValidationsGenCtx getValsGenCtx() {
    return privateValsGenCtx;
  }

  public final void setValsGenCtx(DataTypeValidationsGenCtx value) {
    privateValsGenCtx = value;
  }

  public BaseEntityGeneratorContext getDtEntityContext(){
    return (BaseEntityGeneratorContext)getParentContext().getProjContext().getCefGenContext().getEntityGenContext();
  }

  public TypeInfo getFieldTypeInfo(IGspCommonField field)
  {return getParentContext().getFieldTypeInfo(this.getNodeCode(),field);}
}
